home *** CD-ROM | disk | FTP | other *** search
/ 1st Multimedia Mac Shareware / Multimedia Shareware CD-ROM - BetaCorp.iso / StackToolsƒ / Utilities / Plots / background_19562.xml next >
Encoding:
Extensible Markup Language  |  1992-08-13  |  6.2 KB  |  173 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE background PUBLIC "-//Apple, Inc.//DTD background V 2.0//EN" "" >
  3. <background>
  4.     <id>19562</id>
  5.     <filler1>0</filler1>
  6.     <bitmap>BMAP_19781.pbm</bitmap>
  7.     <cantDelete> <true /> </cantDelete>
  8.     <showPict> <true /> </showPict>
  9.     <dontSearch> <false /> </dontSearch>
  10.     <link rel="stylesheet" type="text/css" href="stylesheet_13428.css" />
  11.     <part>
  12.         <id>1</id>
  13.         <type>field</type>
  14.         <visible> <false /> </visible>
  15.         <dontWrap> <false /> </dontWrap>
  16.         <dontSearch> <false /> </dontSearch>
  17.         <sharedText> <false /> </sharedText>
  18.         <fixedLineHeight> <true /> </fixedLineHeight>
  19.         <autoTab> <false /> </autoTab>
  20.         <lockText> <false /> </lockText>
  21.         <rect>
  22.             <left>5</left>
  23.             <top>42</top>
  24.             <right>21</right>
  25.             <bottom>57</bottom>
  26.         </rect>
  27.         <style>transparent</style>
  28.         <autoSelect> <false /> </autoSelect>
  29.         <showLines> <false /> </showLines>
  30.         <wideMargins> <false /> </wideMargins>
  31.         <multipleLines> <false /> </multipleLines>
  32.         <reservedFamily> 0 </reservedFamily>
  33.         <titleWidth>0</titleWidth>
  34.         <icon>0</icon>
  35.         <textAlign>left</textAlign>
  36.         <font>Geneva</font>
  37.         <textSize>12</textSize>
  38.         <textStyle>plain</textStyle>
  39.         <textHeight>16</textHeight>
  40.         <name>Total</name>
  41.         <script></script>
  42.     </part>
  43.     <part>
  44.         <id>2</id>
  45.         <type>field</type>
  46.         <visible> <true /> </visible>
  47.         <dontWrap> <false /> </dontWrap>
  48.         <dontSearch> <false /> </dontSearch>
  49.         <sharedText> <false /> </sharedText>
  50.         <fixedLineHeight> <false /> </fixedLineHeight>
  51.         <autoTab> <false /> </autoTab>
  52.         <lockText> <false /> </lockText>
  53.         <rect>
  54.             <left>27</left>
  55.             <top>43</top>
  56.             <right>227</right>
  57.             <bottom>60</bottom>
  58.         </rect>
  59.         <style>transparent</style>
  60.         <autoSelect> <false /> </autoSelect>
  61.         <showLines> <false /> </showLines>
  62.         <wideMargins> <false /> </wideMargins>
  63.         <multipleLines> <false /> </multipleLines>
  64.         <reservedFamily> 0 </reservedFamily>
  65.         <titleWidth>0</titleWidth>
  66.         <icon>0</icon>
  67.         <textAlign>left</textAlign>
  68.         <font>Chicago</font>
  69.         <textSize>12</textSize>
  70.         <textStyle>plain</textStyle>
  71.         <textHeight>16</textHeight>
  72.         <name>SeriesName</name>
  73.         <script></script>
  74.     </part>
  75.     <part>
  76.         <id>3</id>
  77.         <type>field</type>
  78.         <visible> <true /> </visible>
  79.         <dontWrap> <false /> </dontWrap>
  80.         <dontSearch> <false /> </dontSearch>
  81.         <sharedText> <false /> </sharedText>
  82.         <fixedLineHeight> <true /> </fixedLineHeight>
  83.         <autoTab> <false /> </autoTab>
  84.         <lockText> <false /> </lockText>
  85.         <rect>
  86.             <left>280</left>
  87.             <top>44</top>
  88.             <right>350</right>
  89.             <bottom>298</bottom>
  90.         </rect>
  91.         <style>rectangle</style>
  92.         <autoSelect> <false /> </autoSelect>
  93.         <showLines> <true /> </showLines>
  94.         <wideMargins> <false /> </wideMargins>
  95.         <multipleLines> <false /> </multipleLines>
  96.         <reservedFamily> 0 </reservedFamily>
  97.         <titleWidth>0</titleWidth>
  98.         <icon>0</icon>
  99.         <textAlign>left</textAlign>
  100.         <font>Geneva</font>
  101.         <textSize>9</textSize>
  102.         <textStyle>plain</textStyle>
  103.         <textHeight>12</textHeight>
  104.         <name>Names</name>
  105.         <script></script>
  106.     </part>
  107.     <part>
  108.         <id>4</id>
  109.         <type>field</type>
  110.         <visible> <true /> </visible>
  111.         <dontWrap> <false /> </dontWrap>
  112.         <dontSearch> <false /> </dontSearch>
  113.         <sharedText> <false /> </sharedText>
  114.         <fixedLineHeight> <true /> </fixedLineHeight>
  115.         <autoTab> <false /> </autoTab>
  116.         <lockText> <false /> </lockText>
  117.         <rect>
  118.             <left>361</left>
  119.             <top>44</top>
  120.             <right>433</right>
  121.             <bottom>298</bottom>
  122.         </rect>
  123.         <style>rectangle</style>
  124.         <autoSelect> <false /> </autoSelect>
  125.         <showLines> <true /> </showLines>
  126.         <wideMargins> <false /> </wideMargins>
  127.         <multipleLines> <false /> </multipleLines>
  128.         <reservedFamily> 0 </reservedFamily>
  129.         <titleWidth>0</titleWidth>
  130.         <icon>0</icon>
  131.         <textAlign>right</textAlign>
  132.         <font>Geneva</font>
  133.         <textSize>9</textSize>
  134.         <textStyle>plain</textStyle>
  135.         <textHeight>12</textHeight>
  136.         <name>Freq</name>
  137.         <script></script>
  138.     </part>
  139.     <part>
  140.         <id>6</id>
  141.         <type>button</type>
  142.         <visible> <true /> </visible>
  143.         <reserved5> 0 </reserved5>
  144.         <reserved4> 0 </reserved4>
  145.         <reserved3> 0 </reserved3>
  146.         <reserved2> 0 </reserved2>
  147.         <reserved1> 0 </reserved1>
  148.         <enabled> <true /> </enabled>
  149.         <rect>
  150.             <left>243</left>
  151.             <top>309</top>
  152.             <right>343</right>
  153.             <bottom>331</bottom>
  154.         </rect>
  155.         <style>roundrect</style>
  156.         <showName> <true /> </showName>
  157.         <highlight> <false /> </highlight>
  158.         <autoHighlight> <true /> </autoHighlight>
  159.         <sharedHighlight> <true /> </sharedHighlight>
  160.         <family>0</family>
  161.         <titleWidth>0</titleWidth>
  162.         <icon>0</icon>
  163.         <textAlign>center</textAlign>
  164.         <font>Chicago</font>
  165.         <textSize>12</textSize>
  166.         <textStyle>plain</textStyle>
  167.         <name>Plot Pie Graph</name>
  168.         <script>on mouseUp
  169. set cursor to watch
  170. put empty into bg field Names of card PieGraph
  171. put empty into bg field Freq of card PieGraph
  172. clearScreen
  173.  
  174. if fld SeriesName of cd PieGraph is empty then
  175. ask "What Series do you want to plot?"
  176. if it is empty then exit mouseUp
  177. put it into fld SeriesName
  178. end if
  179. put fld SeriesName into nameholder
  180.  
  181. --draw the pie graph (modified after Apple routine)
  182.  
  183. put 80 into pieTop
  184. put 42 into pieLeft
  185. put 170 into pieDiameter
  186.  
  187. clearScreen
  188. reset paint
  189. choose oval tool
  190. set lineSize to 2
  191. set dragSpeed to 0
  192. set pattern to 12
  193. drag from pieLeft,pieTop to pieLeft+pieDiameter, pieTop+pieDiameter
  194. set centered to false
  195.  
  196. put the number of lines in field "Freq" into dataCount
  197. put zero into total
  198. repeat with i = 1 to dataCount
  199. add line i of field "Freq" to total
  200. end repeat
  201.  
  202. put pieDiameter div 2 into pieRadius
  203. put pieLeft+pieRadius into pieCenterX
  204. put pieTop+pieRadius into pieCenterY
  205.  
  206. choose line tool
  207. put zero into angle
  208. put zero into change
  209. repeat with i = 1 to dataCount+1
  210. put pieCenterX + round(pieRadius * sin(angle)) into x
  211. put pieCenterY - round(pieRadius * cos(angle)) into y
  212. choose line tool
  213. set pattern to 12
  214. drag from pieCenterX,pieCenterY to x,y
  215. if change > .04 then
  216. set pattern to getPattern(i)
  217. choose bucket tool
  218. click at halfX, halfY
  219. end if
  220.  
  221. get line i of field "Freq"
  222. put pi * it / total into change
  223. add change to angle
  224. put pieCenterX + round((pieRadius-3) * sin(angle)) into halfX
  225. put pieCenterY - round((pieRadius-3) * cos(angle)) into halfY
  226. add change to angle
  227.  
  228. end repeat
  229. reset paint
  230. choose browse tool
  231. set cursor to hand
  232. unlock Screen
  233.  
  234. end mouseUp
  235.  
  236. function getPattern selector
  237. return item (selector mod 12)+1 of "2,13,11,3,14,6,21,17,31,18,4,32"
  238. end getPattern
  239.  
  240. </script>
  241.     </part>
  242.     <name>PieBg</name>
  243.     <script></script>
  244. </background>
  245.